<?
$muc=(int)$_REQUEST['muc'];
	$cat=(int)$_REQUEST['id'];
	if ($cat==0) $cat=1;
	$news_per_page=5;
	$p=(int)$_REQUEST['p'];
	$where="1=1 and status=0";
	if ($cat>0) $where.=" and categories_id=".$cat;

$total=CountRecord("newsvn",$where);
?>
<?
	$sql = "select * from newsvn where $where order by date_added desc limit ".$news_per_page*$p.",".$news_per_page;
	$result = @mysql_query($sql,$con);
	while(($n=mysql_fetch_assoc($result)))	
	{
?>      
<div class="boxtt"> 
			<ul class="boxtt1">
              <? if($n['news_image']!=''){?> <a href="./?frame=newsviewvn&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>">
			<img src="<? echo $n['news_image']; ?>" border="0" align="left" vspace="5" hspace="5" width="105" height="90"></a> <? }?><strong><a href="./?frame=newsviewvn&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>">
		<? echo $n['news_subject']; ?></a></strong>
				 <span> <i>(<? echo date('d/m',strtotime($n['date_added'])); ?>)</i></span>
           	     <li><?    $a=catchuoi($n['news_shortcontent'],700); echo $a;?><a href="./?frame=newsviewvn&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>"><font color="#FF6633"> &nbsp;&nbsp;&nbsp;&nbsp;  Chi ti&#7871;t</font></a></li>
            </ul> 
</div>
<?
}
?>     
<?
$total=CountRecord("newsvn",$where." and status=0 and categories_id=".$cat);
if ($total>0) ListPaging($total,count_page($total,$news_per_page),$p,"./?frame=".$_REQUEST['frame']."&cat=".$cat."&menuid=".$_REQUEST['menuid']."&p=","m&#7909;c");
?>